import type {
	UserItemResponseModel,
	UserResponseModel,
	UserTwoFactorProviderModel,
} from '@umbraco-cms/backoffice/external/backend-api';
import { UserKindModel, UserStateModel } from '@umbraco-cms/backoffice/external/backend-api';

export type UmbMockUserModel = UserResponseModel & UserItemResponseModel;

export const data: Array<UmbMockUserModel> = [
	{
		avatarUrls: [],
		createDate: '3/13/2022',
		documentStartNodeIds: [],
		email: 'noreply@umbraco.com',
		failedLoginAttempts: 946,
		hasDocumentRootAccess: true,
		hasMediaRootAccess: true,
		id: 'bca6c733-a63d-4353-a271-9a8b6bcca8bd',
		isAdmin: true,
		kind: UserKindModel.DEFAULT,
		languageIsoCode: 'en-us',
		lastLockoutDate: '11/23/2021',
		lastLoginDate: '9/10/2022',
		lastPasswordChangeDate: '1/10/2022',
		mediaStartNodeIds: [],
		name: 'Umbraco User',
		state: UserStateModel.ACTIVE,
		updateDate: '2/10/2022',
		userGroupIds: [{ id: 'user-group-administrators-id' }, { id: 'user-group-editors-id' }],
		userName: '',
	},
	{
		avatarUrls: [],
		createDate: '2023-10-12T18:30:32.879Z',
		documentStartNodeIds: [{ id: 'simple-document-id' }],
		email: 'awalker1@domain.com',
		failedLoginAttempts: 0,
		hasDocumentRootAccess: true,
		hasMediaRootAccess: true,
		id: '82e11d3d-b91d-43c9-9071-34d28e62e81d',
		isAdmin: true,
		kind: UserKindModel.DEFAULT,
		languageIsoCode: 'da-dk',
		lastLockoutDate: null,
		lastLoginDate: '2023-10-12T18:30:32.879Z',
		lastPasswordChangeDate: '2023-10-12T18:30:32.879Z',
		mediaStartNodeIds: [{ id: 'f2f81a40-c989-4b6b-84e2-057cecd3adc1' }],
		name: 'Amelie Walker',
		state: UserStateModel.INACTIVE,
		updateDate: '2023-10-12T18:30:32.879Z',
		userGroupIds: [{ id: 'user-group-administrators-id' }],
		userName: '',
	},
	{
		avatarUrls: [],
		createDate: '2023-10-12T18:30:32.879Z',
		documentStartNodeIds: [],
		email: 'okim1@domain.com',
		failedLoginAttempts: 0,
		hasDocumentRootAccess: true,
		hasMediaRootAccess: true,
		id: 'aa1d83a9-bc7f-47d2-b288-58d8a31f5017',
		isAdmin: false,
		kind: UserKindModel.DEFAULT,
		languageIsoCode: 'da-dk',
		lastLockoutDate: null,
		lastLoginDate: '2023-10-12T18:30:32.879Z',
		lastPasswordChangeDate: '2023-10-12T18:30:32.879Z',
		mediaStartNodeIds: [],
		name: 'Oliver Kim',
		state: UserStateModel.ACTIVE,
		updateDate: '2023-10-12T18:30:32.879Z',
		userGroupIds: [{ id: 'user-group-editors-id' }],
		userName: '',
	},
	{
		avatarUrls: [],
		createDate: '2023-10-12T18:30:32.879Z',
		documentStartNodeIds: [],
		email: 'enieves1@domain.com',
		failedLoginAttempts: 0,
		hasDocumentRootAccess: true,
		hasMediaRootAccess: true,
		id: 'ff2f4a50-d3d4-4bc4-869d-c7948c160e54',
		isAdmin: false,
		kind: UserKindModel.DEFAULT,
		languageIsoCode: 'en-us',
		lastLockoutDate: null,
		lastLoginDate: '2023-10-12T18:30:32.879Z',
		lastPasswordChangeDate: null,
		mediaStartNodeIds: [],
		name: 'Eliana Nieves',
		state: UserStateModel.INVITED,
		updateDate: '2023-10-12T18:30:32.879Z',
		userGroupIds: [{ id: 'user-group-editors-id' }],
		userName: '',
	},
	{
		avatarUrls: [],
		createDate: '2023-10-12T18:30:32.879Z',
		documentStartNodeIds: [],
		email: 'jpatel1@domain.com',
		failedLoginAttempts: 25,
		hasDocumentRootAccess: true,
		hasMediaRootAccess: true,
		id: 'c290c6d9-9f12-4838-8567-621b52a178de',
		isAdmin: false,
		kind: UserKindModel.DEFAULT,
		languageIsoCode: 'en-us',
		lastLockoutDate: '2023-10-12T18:30:32.879Z',
		lastLoginDate: '2023-10-12T18:30:32.879Z',
		lastPasswordChangeDate: null,
		mediaStartNodeIds: [],
		name: 'Jasmine Patel',
		state: UserStateModel.LOCKED_OUT,
		updateDate: '2023-10-12T18:30:32.879Z',
		userGroupIds: [{ id: 'user-group-editors-id' }, { id: 'user-group-sensitive-data-id' }],
		userName: '',
	},
];

/**
 * Mock data for MFA login providers
 * This is usually linked to a user, but for the sake of the mock, we're just going to have a list of providers
 */
export const mfaLoginProviders: Array<UserTwoFactorProviderModel> = [
	{
		isEnabledOnUser: true,
		providerName: 'Google Authenticator',
	},
	{
		isEnabledOnUser: false,
		providerName: 'sms',
	},
];
